package com.zhentao.controller;


import com.zhentao.model.es.dto.HistorySearchDto;
import com.zhentao.schedule.model.common.dtos.ResponseResult;
import com.zhentao.service.ApUserSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Date 2024/3/12 11:11
 * @Author xdm
 **/
@RestController
@RequestMapping("/api/v1/history")
public class ApUserSearchController {


    @Autowired
    private ApUserSearchService apUserSearchService;
//    历史记录
    @PostMapping("/load")
    public ResponseResult findUserSearch() {
        return apUserSearchService.findUserSearch();
    }
    @PostMapping("/del")
    public ResponseResult delUserSearch(@RequestBody HistorySearchDto dto){
        return apUserSearchService.delUserSearch(dto);
    }
}